import * as ZY from './glo/lib/main.js';
// eslint-disable-next-line no-undef
globalThis.ZY = ZY;

import * as ZY_EXT from './glo/lib/vue2.js';
// eslint-disable-next-line no-undef
globalThis.ZY_EXT = ZY_EXT;

import './wangeditor/dist/css/style.css'
import * as wangEditor from './wangeditor/dist/index.min.js'
globalThis.ZY__wangEditor = wangEditor


import './ext/webcoms/layout.js';

/**
 *
 * @param obj {Object}
 * @param path {string}
 * @param val
 */
function deepInit(obj, path, val) {
  let descendant = ZY.lodash.get(obj, path);
  if (!descendant) {
    descendant = val;
    ZY.lodash.set(obj, path, descendant);
  }
}

globalThis.ZY.T = {
  state(o = {}) {
    const {reactive} = vueCompositionAPI
    return reactive(o)
  },
  deepInit
}

import '@spectrum-web-components/tabs/sp-tabs.js';
import '@spectrum-web-components/tabs/sp-tab.js';
import '@spectrum-web-components/tabs/sp-tab-panel.js';

import './ext/webcoms/ZwTabs'
